home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club (Business) 1997 July / Software of the Month Club - Business (Volume 239) (July 1997).iso / pc / code / h.dxr / 00008_DoctorCharVidLogic.ls < prev    next >
Encoding:
Text File  |  1996-02-15  |  5.8 KB  |  143 lines

  1. global NULLrect, gHotRects, gObjects, sQTCharSprite
  2.  
  3. on pickDoctor playCount
  4.   set doctorObj to getaProp(gObjects, #Doc11Vid)
  5.   if (getaProp(gCurKeyList, #RefName) = #H20) or (getaProp(gLastKeyList, #RefName) = #H20) then
  6.     if getOne(getaProp(doctorObj, #condList), #opTheater) = 0 then
  7.       if playCount = 1 then
  8.         set State to #opTheater1
  9.         MakeDynamic(#Doc11Vid, #curCond, #opTheater)
  10.       else
  11.         set State to #opTheater2
  12.       end if
  13.     else
  14.       MakeDynamic(#Doc11vidrect, #Hotrect, [NULLrect])
  15.       set State to #OffScreen
  16.     end if
  17.   else
  18.     if getaProp(getaProp(gStates, #Conditions), #Heart) = #true then
  19.       MakeDynamic(#Doc11vidrect, #Hotrect, [NULLrect])
  20.       if getOne(getaProp(doctorObj, #condList), #heartSolved) = 0 then
  21.         set State to #heartSolved
  22.         MakeDynamic(#Doc11Vid, #curCond, #heartSolved)
  23.       else
  24.         set State to #OffScreen
  25.       end if
  26.     else
  27.       if getaProp(doctorObj, #h12Count) >= 1 then
  28.         if playCount = 1 then
  29.           set State to #Dead1
  30.           set Playlist to getaProp(doctorObj, #Playlist)
  31.           add(Playlist, "H11dnd3.mov")
  32.           MakeDynamic(#Doc11Vid, #Playlist, Playlist)
  33.         else
  34.           if playCount = 2 then
  35.             set State to #Dead2
  36.           else
  37.             if playCount = 3 then
  38.               set State to #Dead3
  39.             else
  40.               set State to #OffScreen
  41.             end if
  42.           end if
  43.         end if
  44.       else
  45.         if getaProp(doctorObj, #slippingCond) = #true then
  46.           MakeDynamic(#Doc11vidrect, #Hotrect, [NULLrect])
  47.           if getOne(getaProp(doctorObj, #condList), #slipping) = 0 then
  48.             set State to #slipping
  49.             MakeDynamic(#Doc11Vid, #curCond, #slipping)
  50.             set Playlist to getaProp(doctorObj, #Playlist)
  51.             add(Playlist, "H11dnd2.mov")
  52.             MakeDynamic(#Doc11Vid, #Playlist, Playlist)
  53.           else
  54.             set State to #OffScreen
  55.           end if
  56.         else
  57.           if getaProp(doctorObj, #messingUpCond) = #true then
  58.             MakeDynamic(#Doc11vidrect, #Hotrect, [NULLrect])
  59.             if getOne(getaProp(doctorObj, #condList), #messingUp) = 0 then
  60.               set State to #messingUp
  61.               MakeDynamic(#Doc11Vid, #curCond, #messingUp)
  62.               set Playlist to getaProp(doctorObj, #Playlist)
  63.               add(Playlist, "H11dnd1.mov")
  64.               MakeDynamic(#Doc11Vid, #Playlist, Playlist)
  65.             else
  66.               set State to #OffScreen
  67.             end if
  68.           else
  69.             if getaProp(getaProp(gStates, #Conditions), #Defibrillate) = #true then
  70.               if getaProp(getaProp(gObjects, #TubeObj), #Aquired) = #false then
  71.                 if getOne(getaProp(doctorObj, #condList), #defibSolved1) = 0 then
  72.                   if playCount = 1 then
  73.                     set State to #defibSolved1
  74.                     if getaProp(doctorObj, #curCond) = #defibSolved1 then
  75.                       setaProp(getaProp(gHotRects, (100 * getaProp(getaProp(gObjects, #Doc11vidrect), #SpriteNum)) + 1), #rect, rect(0, 0, 560, 336))
  76.                     end if
  77.                     MakeDynamic(#Doc11Vid, #curCond, #defibSolved1)
  78.                     set Playlist to getaProp(doctorObj, #Playlist)
  79.                     add(Playlist, "H11dps1.mov")
  80.                     MakeDynamic(#Doc11Vid, #Playlist, Playlist)
  81.                     MakeDynamic(#Doc11vidrect, #Hotrect, [rect(0, 0, 560, 336)])
  82.                   else
  83.                     set State to #defibSolved2
  84.                     MakeDynamic(#Doc11Vid, #curCond, #defibSolved2)
  85.                     MakeDynamic(#Doc11vidrect, #Hotrect, [rect(318, 40, 558, 256)])
  86.                     set Playlist to getaProp(doctorObj, #Playlist)
  87.                     add(Playlist, "H11dps2.mov")
  88.                     MakeDynamic(#Doc11Vid, #Playlist, Playlist)
  89.                     setaProp(getaProp(gHotRects, (100 * getaProp(getaProp(gObjects, #Doc11vidrect), #SpriteNum)) + 1), #rect, NULLrect)
  90.                   end if
  91.                 else
  92.                   if getOne(getaProp(doctorObj, #condList), #defibSolved2) = 0 then
  93.                     MakeDynamic(#Doc11vidrect, #Hotrect, [NULLrect])
  94.                     MakeDynamic(#Doc11Vid, #curCond, #defibSolved2)
  95.                     if getOne(getaProp(doctorObj, #Playlist), "H11dps2.mov") = 0 then
  96.                       set State to #defibSolved2
  97.                       set Playlist to getaProp(doctorObj, #Playlist)
  98.                       add(Playlist, "H11dps2.mov")
  99.                       MakeDynamic(#Doc11Vid, #Playlist, Playlist)
  100.                     else
  101.                       set State to #OffScreen
  102.                     end if
  103.                   else
  104.                     MakeDynamic(#Doc11vidrect, #Hotrect, [NULLrect])
  105.                     set State to #OffScreen
  106.                   end if
  107.                 end if
  108.               else
  109.                 set State to #OffScreen
  110.               end if
  111.             else
  112.               if getaProp(getaProp(gStates, #Conditions), #ShortStock) = #true then
  113.                 MakeDynamic(#Doc11vidrect, #Hotrect, [NULLrect])
  114.                 if getOne(getaProp(doctorObj, #condList), #shrtStckSlvd) = 0 then
  115.                   set State to #shrtStckSlvd
  116.                   MakeDynamic(#Doc11Vid, #curCond, #shrtStckSlvd)
  117.                 else
  118.                   set State to #OffScreen
  119.                 end if
  120.               end if
  121.             end if
  122.           end if
  123.         end if
  124.       end if
  125.     end if
  126.   end if
  127.   MakeDynamic(#Doc11Vid, #State, State)
  128.   MakeDynamic(#Doc11Vid, #DisplayState, State)
  129.   if playCount > 1 then
  130.     DoCharacterMovie(#Doc11Vid)
  131.   end if
  132. end
  133.  
  134. on doDoc11vid
  135.   set OBj to getaProp(gObjects, #Doc11Vid)
  136.   set clickCount to getaProp(OBj, #clickCount) + 1
  137.   MakeDynamic(#Doc11Vid, #clickCount, clickCount)
  138.   pickDoctor(clickCount)
  139.   set the movieRate of sprite sQTCharSprite to 0
  140.   set the movieTime of sprite sQTCharSprite to 0
  141.   set the movieRate of sprite sQTCharSprite to 1
  142. end
  143.